package cn.lizemin.state.version0;

import cn.lizemin.state.version0.entity.TrafficLight;

/**
 * @author lzm
 * @version 1.0
 * @description: 利用状态模式进行优化
 * @date 2022/4/24 22:05
 */
public class Client {

    /**
     * 程序的入口
     */
    public static void main(String[] args) {
        TrafficLight trafficLight = new TrafficLight();
        trafficLight.switchToYellow();
        trafficLight.switchToRed();
        trafficLight.switchToGreen();
        trafficLight.switchToRed();

    }

}
